package test_2_26;

import java.util.Scanner;

public class two {
    public static void main(String[]args)
    {
        Scanner sc=new Scanner(System.in);
        StringBuffer s=new StringBuffer(sc.next());
        int c=s.length();
        System.out.println(c);
        s.reverse();
        String d=s.toString();
        System.out.println(d);
    }
}
